package cn.lhq.controller.vote;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import cn.lhq.bean.VoteResult;
import cn.lhq.service.VoteServiceImpl;

@Controller
@RequestMapping("/vote")
public class FindByActivityIdController {
	@Resource
	private VoteServiceImpl voteServiceImpl;
	@RequestMapping("/findByActivityId.do")
	@ResponseBody
	public VoteResult findByActivityId(int activityId){
		VoteResult result = new VoteResult();
		try {
			result = voteServiceImpl.findByActivityId(activityId);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		System.out.println("-----controller---");
		return result;
	}
}
